package com.isesol.ime.entity;

import com.isesol.ime.*;
import com.isesol.orm.jpa.*;

import javax.persistence.*;
import java.util.*;

/**
 * 报文订阅管理
 *
 * @author Wang Jun
 */
@Entity
@Table(name = "subscription", catalog = Constant.DB_SCHEME_MT)
@Access(AccessType.FIELD)
public class Subscription extends IdEntity<Long>{

	/**
	 * 机床ID
	 */
	private String machineId;

	/**
	 * 报文id
	 */
	@ManyToOne
	@JoinColumn(name = "msg_id")
	private Message message;

	/**
	 * 使用状态
	 */
	private String usingStatus;

	/**
	 * 机床类型id
	 */
	private long typeId;

	/**
	 * 备注
	 */
	private String memo;

	/**
	 * 操作人
	 */
	private String user;

	/**
	 * 操作时间
	 */
	private Date time;

	private String status;

	public String getUsingStatus(){

		return usingStatus;
	}

	public void setUsingStatus(String usingStatus){

		this.usingStatus = usingStatus;
	}

	public String getMachineId(){

		return machineId;
	}

	public void setMachineId(String machineId){

		this.machineId = machineId;
	}

	public Message getMessage(){

		return message;
	}

	public void setMessage(Message message){

		this.message = message;
	}

	public String getStatus(){

		return status;
	}

	public void setStatus(String status){

		this.status = status;
	}

	public long getTypeId(){

		return typeId;
	}

	public void setTypeId(long typeId){

		this.typeId = typeId;
	}

	public String getMemo(){

		return memo;
	}

	public void setMemo(String memo){

		this.memo = memo;
	}

	public String getUser(){

		return user;
	}

	public void setUser(String user){

		this.user = user;
	}

	public Date getTime(){

		return time;
	}

	public void setTime(Date time){

		this.time = time;
	}
}
